STEP 4: The wizard will reply to the user with one of four answers. We'll use a random number to pick which answer.

  • In the LOGIC tab, open and drag out Random Integer.
  • Also from drag out Variable Display. Drop it at the bottom of your program.
  • Click Run and notice that a random number is displayed on the stage. Try clicking Run more than once!

Remember, random.randint() takes two integer arguments and generates a random integer between them!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)